<?php
namespace Plu\Library\Models\Tga\Messageboard;

use Phalcon\Mvc\Model;

class Admire extends Model {

	public $id;
    public $uid;
    public $appkey;
    public $messageid;
    public $createtime;

    public function initialize() {
        $this->setConnectionService('db.tga');
    }

    public function getSource() {
        return 'admire';
    }

    static public function addItem($appkey, $uid, $messageid) {
        $item = new self;
        $item->uid = $uid;
        $item->appkey = $appkey;
        $item->messageid = $messageid;
        $item->createtime = time();

        return $item->save();
    }
}
?>
